timer: Fix up timer-state teardown on CPU offline / online-failure.
authorKeir Fraser <keir@xen.org>
Sat, 8 Jan 2011 09:29:11 +0000 (09:29 +0000)
committerKeir Fraser <keir@xen.org>
Sat, 8 Jan 2011 09:29:11 +0000 (09:29 +0000)
commitfd01e26c97cd60849264baff3831a7b6a0edefd4
tree97c537b6cd75bf2a77ce49cb61f601b0d14b79e2
parent1be584b57a4657d680e5551dc253ce164f06b4ac
timer: Fix up timer-state teardown on CPU offline / online-failure.

The lock-free access to timer->cpu in timer_lock() is problematic, as
the per-cpu data that is then dereferenced could disappear under our
feet. Now that per-cpu data is freed via RCU, we simply add a RCU
read-side critical section to timer_lock(). It is then also
unnecessary to migrate timers on CPU_DYING (we can defer it to the
nicer CPU_DEAD state) and we can also safely migrate timers on
CPU_UP_CANCELED.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/timer.c